package mapmaker.thread;

import mapmaker.config.Config;
import mapmaker.robot.Robot;

public class ThreadCheckLaser implements Runnable {

	private Robot _robot;
	
	public ThreadCheckLaser(Robot r){
		_robot = r;
	}
	
	@Override
	public void run() {
		while(true){
			_robot.setObstableForward(_robot.isObstacleForward());
			try {
				Thread.sleep(Config.PERIOD_LASERCHECKER);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

}
